import { IPosterItem } from '@/utils/type';
import { request } from 'umi';

// 获取文章列表
export function getArticleList(){
    return request('/api/article');
}

// 获取文章详情
export function getArticleDetail(articleId: string){
    return request(`/api/article/${articleId}`);
}

// 生成文章分享海报
export function genePoster(data: IPosterItem){
    return request(`/api/poster`, {
        method: 'POST',
        data
    })
}